#ifndef __C377EA8A_8014_4efd_8791_FDD66DB8CEFD__
#define __C377EA8A_8014_4efd_8791_FDD66DB8CEFD__

/////////////////////////////////////////////////////////////////////////////////////////
// 

namespace xos
{
    // 
    // dir interface
    // 
    class i_dir
    {
    public:
        virtual ~i_dir(){}

    public:
        //////////////////////////////////////////////////////////////////////////////////
        // 
        // get full file name path
        // 
        virtual int get_file_path( char * lpszPath, int nLen, const char * lpszFile ) = 0;

        // 
        // create dir and sub dirs
        // 
        virtual int create_directory( const char * lpszPath ) = 0;

        // 
        // delete dir and sub dirs
        // 
        virtual int delete_directory( const char * lpszPath ) = 0;

        // 
        // if a dir exists
        // 
        virtual int is_dir_exist( const char * lpszPath ) = 0;

        //////////////////////////////////////////////////////////////////////////////////
        // 
        // clear last result and find with lpszPath filter
        // 
        virtual int begin_find_file( const char * lpszPath ) = 0;

        // 
        // finish find with filter
        // 
        virtual int end_find_file() = 0;

        // 
        // get find results one by one. this will remove i_file from inner i_file list.
        // user should release i_file
        // 
        virtual int get_find_result( i_file ** ppFile ) = 0;

        //////////////////////////////////////////////////////////////////////////////////
        // 
        // if a file exists
        // 
        virtual int is_file_exist( const char * lpszFileName ) = 0;

        // 
        // delete a file
        // 
        virtual int delete_file( const char * lpszFileName ) = 0;

        // 
        // get file size
        // 
        virtual int get_file_size( const char * lpszFile, xos_i64 * lpSize64 ) = 0;

        // 
        // rename a file
        // 
        virtual int rename_file( const char * lpszDesName, const char * lpszSrcName ) = 0;

        // 
        // release
        // 
        virtual int release() = 0;
    };
}

#endif // __C377EA8A_8014_4efd_8791_FDD66DB8CEFD__
